﻿using Coldairarrow.Entity.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Mail;
using System.Text;
using System.Threading.Tasks;

namespace Coldairarrow.Business.Interface
{

    public class PL_ReqDTO_PushOrder : PL_BaseReqDTO
    {
        /// <summary>
        /// One_linkID
        /// </summary>
        public string RowId { get; set; }
        /// <summary>
        /// One_linkID
        /// </summary>
        public string ResultMsg { get; set; }
        /// <summary>
        /// 仓库编码
        /// </summary>
        public string warehouse_code { get; set; }
        /// <summary>
        /// 用户自定义订单号
        /// </summary>
        public string reference_code { get; set; }
        /// <summary>
        /// 用户自定义订单号（添加编号前）
        /// </summary>
        public string reference_code_before { get; set; }

        /// <summary>
        /// 物流方式代码，参考OMS物流方式
        /// </summary>
        public string method_code { get; set; }
        /// <summary>
        /// 打包类型；ONE:一票一件(有且仅有一个SKU并且数量为1);MORE:一票多件(多个SKU，发货时拆分成一票一件发货);COMBIN:组合订单(多个SKU，发货时由仓库决定包裹数)
        /// </summary>
        public string package_type { get; set; }
        /// <summary>
        /// 订单类型;SALE：普通订单；FBA：FBA订单;默认SALE
        /// </summary>
        public string order_type { get; set; }
        /// <summary>
        /// 保险类型;NI:无保险;LOW:低值保险;HI:高值保险;OT:其他保险 默认OT
        /// </summary>
        public string insure_type { get; set; }
        /// <summary>
        /// 是否需要更换条码;YES:是;NO:否
        /// </summary>
        public string need_change_barcode { get; set; }
        /// <summary>
        /// FBA地址CODE,FBA单填写
        /// </summary>

        public string fba_address_code { get; set; }
        /// <summary>
        /// 签名服务;NO_SIGN:不需要签名;SIGN:普通签名;ADULT_SIGN:成人签名;默认NO_SIGN
        /// </summary>
        public string sign_type { get; set; }

        /// <summary>
        /// FBA箱唛编码,FBA单填写
        /// </summary>
        public string fba_shipment_box_code { get; set; }
        /// <summary>
        /// 追踪号
        /// </summary>

        public string tracking_no { get; set; }
        /// <summary>
        /// 平台代码。当平台为eBay时需传值'ebay'
        /// </summary>

        public string platform { get; set; }
        /// <summary>
        /// 订单备注
        /// </summary>

        public string note { get; set; }
        /// <summary>
        /// 收件人信息
        /// </summary>

        public Consignee consignee { get; set; }


        public class Consignee
        {
            /// <summary>
            /// 收件人全名
            /// </summary>

            public string full_name { get; set; }
            /// <summary>
            /// 国家代码,国家二字码
            /// </summary>

            public string country_code { get; set; }
            /// <summary>
            /// 州;美国，加拿大必填，二字代码
            /// </summary>

            public string state { get; set; }
            /// <summary>
            /// 城市
            /// </summary>

            public string city { get; set; }
            /// <summary>
            /// 街道
            /// </summary>

            public string street1 { get; set; }
            /// <summary>
            /// 街道2
            /// </summary>

            public string street2 { get; set; }
            /// <summary>
            /// 街道3
            /// </summary>

            public string street3 { get; set; }
            /// <summary>
            /// 门牌号
            /// </summary>

            public string doorplate { get; set; }
            /// <summary>
            /// 邮编编码
            /// </summary>

            public string postal_code { get; set; }
            /// <summary>
            /// 电子邮箱地址
            /// </summary>

            public string email { get; set; }
            /// <summary>
            /// 联系电话
            /// </summary>

            public string phone { get; set; }
            /// <summary>
            /// 公司名称
            /// </summary>

            public string company { get; set; }


        }



        /// <summary>
        /// SKU编码
        /// </summary>

        public string sku { get; set; }
        /// <summary>
        /// 订单数量
        /// </summary>

        public int quantity { get; set; }
        /// <summary>
        /// 更换后的条码；need_change_barcode=YES，需要填写
        /// </summary>

        public string change_barcode { get; set; }
        /// <summary>
        /// eBay订单交易ID
        /// </summary>

        public string transaction_id { get; set; }
        /// <summary>
        /// eBay订单条目ID
        /// </summary>

        public string item_id { get; set; }

        /// <summary>
        /// 明细信息
        /// </summary>

        public List<Item_List> item_list { get; set; }
        public class Item_List
        {
            /// <summary>
            /// SKU编码
            /// </summary>

            public string sku { get; set; }
            /// <summary>
            /// 订单数量
            /// </summary>

            public int quantity { get; set; }
            /// <summary>
            /// 更换后的条码；need_change_barcode=YES，需要填写
            /// </summary>

            public string change_barcode { get; set; }
            /// <summary>
            /// eBay订单交易ID
            /// </summary>

            public string transaction_id { get; set; }
            /// <summary>
            /// eBay订单条目ID
            /// </summary>

            public string item_id { get; set; }


        }
        /// <summary>
        /// 附件列表
        /// </summary>

        public List<Attachments> attachments { get; set; }

        public class Attachments
        {
            /// <summary>
            /// 附件类型
            /// </summary>

            public string attachment_type { get; set; }
            /// <summary>
            /// 附件名称

            /// </summary>

            public string attachment_name { get; set; }
            /// <summary>
            /// 附件地址,地址和base64编码选填其一
            /// </summary>

            public string attachment_path { get; set; }
            /// <summary>
            /// base64编码，编码和附件地址选填其一
            /// </summary>

            public string base64 { get; set; }
            /// <summary>
            /// 备注
            /// </summary>

            public string remark { get; set; }

        }

    }
}
